package com.deli.controller;

import com.deli.core.logannotation.Log;
import com.deli.entity.SysUser;
import com.deli.service.SysUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @Description: 登录控制器
 * @Author: xudeli
 * @CreateDate: 2018/8/9 16:30
 **/
@Controller
@Slf4j
public class LoginController {

    @Autowired
    private SysUserService sysUserService;
    @Log(desc="登录")
    @GetMapping("/login")
    @ResponseBody
    public List<SysUser> login123(@RequestParam(value = "id") String id) {
        SysUser sysUser = new SysUser();
        sysUser.setId(id);
        List<SysUser> sysUsers = sysUserService.selectListByPage(sysUser);
        return sysUsers;
    }
}
